
package extreme.fizzbuzz;


import org.apache.commons.lang3.StringUtils;

public class FizzBuzzConverter {

    public static String convert(int number) {
       if(String.valueOf(number).contains("3")){
           return "Fizz";
       }
        String fizz = "";
        String buzz = "";
        String whizz = "";
        if (number % 3 == 0){
            fizz = "Fizz";
        }
        if (number % 5 == 0){
            buzz = "Buzz";
        }
        if (number % 7 == 0){
            whizz = "Whizz";
        }
        String result = fizz + buzz + whizz;
        if(StringUtils.isBlank(result)){
            return String.valueOf(number);
        }
        return result;
    }
}
